
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" lang="zh_CN">
  <head>
    <meta charset="utf-8" />
    <title>reprlib --- 另一种 repr() 实现 &#8212; Python 3.7.8 文档</title>
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/translations.js"></script>
    
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    
    <link rel="search" type="application/opensearchdescription+xml"
          title="在 Python 3.7.8 文档 中搜索"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="关于这些文档" href="../about.html" />
    <link rel="index" title="索引" href="../genindex.html" />
    <link rel="search" title="搜索" href="../search.html" />
    <link rel="copyright" title="版权所有" href="../copyright.html" />
    <link rel="next" title="enum --- 枚举类型支持" href="enum.html" />
    <link rel="prev" title="pprint --- 数据美化输出" href="pprint.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <link rel="canonical" href="https://docs.python.org/3/library/reprlib.html" />
    
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
    
    
    
    <style>
      @media only screen {
        table.full-width-table {
            width: 100%;
        }
      }
    </style>
 

  </head><body>
  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="enum.html" title="enum --- 枚举类型支持"
             accesskey="N">下一页</a> |</li>
        <li class="right" >
          <a href="pprint.html" title="pprint --- 数据美化输出"
             accesskey="P">上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">3.7.8 Documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >Python 标准库</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="datatypes.html" accesskey="U">数据类型</a> &#187;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-reprlib">
<span id="reprlib-alternate-repr-implementation"></span><h1><a class="reference internal" href="#module-reprlib" title="reprlib: Alternate repr() implementation with size limits."><code class="xref py py-mod docutils literal notranslate"><span class="pre">reprlib</span></code></a> --- 另一种 <a class="reference internal" href="functions.html#repr" title="repr"><code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code></a> 实现<a class="headerlink" href="#module-reprlib" title="永久链接至标题">¶</a></h1>
<p><strong>源代码:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.7/Lib/reprlib.py">Lib/reprlib.py</a></p>
<hr class="docutils" />
<p><a class="reference internal" href="#module-reprlib" title="reprlib: Alternate repr() implementation with size limits."><code class="xref py py-mod docutils literal notranslate"><span class="pre">reprlib</span></code></a> 模块提供了一种对象表示的产生方式，它会对结果字符串的大小进行限制。 该方式被用于 Python 调试器，也适用于某些其他场景。</p>
<p>此模块提供了一个类、一个实例和一个函数：</p>
<dl class="class">
<dt id="reprlib.Repr">
<em class="property">class </em><code class="sig-prename descclassname">reprlib.</code><code class="sig-name descname">Repr</code><a class="headerlink" href="#reprlib.Repr" title="永久链接至目标">¶</a></dt>
<dd><p>该类提供了格式化服务 适用于实现与内置 <a class="reference internal" href="functions.html#repr" title="repr"><code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code></a> 相似的方法；其中附加了针对不同对象类型的大小限制，以避免生成超长的表示。</p>
</dd></dl>

<dl class="data">
<dt id="reprlib.aRepr">
<code class="sig-prename descclassname">reprlib.</code><code class="sig-name descname">aRepr</code><a class="headerlink" href="#reprlib.aRepr" title="永久链接至目标">¶</a></dt>
<dd><p>这是 <a class="reference internal" href="#reprlib.Repr" title="reprlib.Repr"><code class="xref py py-class docutils literal notranslate"><span class="pre">Repr</span></code></a> 的一个实例，用于提供如下所述的 <a class="reference internal" href="#reprlib.repr" title="reprlib.repr"><code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code></a> 函数。 改变此对象的属性将会影响 <a class="reference internal" href="#reprlib.repr" title="reprlib.repr"><code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code></a> 和 Python 调试器所使用的大小限制。</p>
</dd></dl>

<dl class="function">
<dt id="reprlib.repr">
<code class="sig-prename descclassname">reprlib.</code><code class="sig-name descname">repr</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="headerlink" href="#reprlib.repr" title="永久链接至目标">¶</a></dt>
<dd><p>这是 <code class="docutils literal notranslate"><span class="pre">aRepr</span></code> 的 <a class="reference internal" href="#reprlib.Repr.repr" title="reprlib.Repr.repr"><code class="xref py py-meth docutils literal notranslate"><span class="pre">repr()</span></code></a> 方法。 它会返回与同名内置函数所返回字符串相似的字符串，区别在于附带了对多数类型的大小限制。</p>
</dd></dl>

<p>在大小限制工具以外，此模块还提供了一个装饰器，用于检测对 <a class="reference internal" href="../reference/datamodel.html#object.__repr__" title="object.__repr__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__repr__()</span></code></a> 的递归调用并改用一个占位符来替换。</p>
<span class="target" id="index-0"></span><dl class="function">
<dt id="reprlib.recursive_repr">
<code class="sig-prename descclassname">&#64;</code><code class="sig-prename descclassname">reprlib.</code><code class="sig-name descname">recursive_repr</code><span class="sig-paren">(</span><em class="sig-param">fillvalue=&quot;...&quot;</em><span class="sig-paren">)</span><a class="headerlink" href="#reprlib.recursive_repr" title="永久链接至目标">¶</a></dt>
<dd><p>用于为 <a class="reference internal" href="../reference/datamodel.html#object.__repr__" title="object.__repr__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__repr__()</span></code></a> 方法检测同一线程内部递归调用的装饰器。 如果执行了递归调用，则会返回 <em>fillvalue</em>，否则执行正常的 <a class="reference internal" href="../reference/datamodel.html#object.__repr__" title="object.__repr__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__repr__()</span></code></a> 调用。 例如：</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">reprlib</span> <span class="kn">import</span> <span class="n">recursive_repr</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">MyList</span><span class="p">(</span><span class="nb">list</span><span class="p">):</span>
<span class="gp">... </span>    <span class="nd">@recursive_repr</span><span class="p">()</span>
<span class="gp">... </span>    <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="gp">... </span>        <span class="k">return</span> <span class="s1">&#39;&lt;&#39;</span> <span class="o">+</span> <span class="s1">&#39;|&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="nb">repr</span><span class="p">,</span> <span class="bp">self</span><span class="p">))</span> <span class="o">+</span> <span class="s1">&#39;&gt;&#39;</span>
<span class="gp">...</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MyList</span><span class="p">(</span><span class="s1">&#39;abc&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;x&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
<span class="go">&lt;&#39;a&#39;|&#39;b&#39;|&#39;c&#39;|...|&#39;x&#39;&gt;</span>
</pre></div>
</div>
<div class="versionadded">
<p><span class="versionmodified added">3.2 新版功能.</span></p>
</div>
</dd></dl>

<div class="section" id="repr-objects">
<span id="id1"></span><h2>Repr 对象<a class="headerlink" href="#repr-objects" title="永久链接至标题">¶</a></h2>
<p><a class="reference internal" href="#reprlib.Repr" title="reprlib.Repr"><code class="xref py py-class docutils literal notranslate"><span class="pre">Repr</span></code></a> 实例对象包含一些属性可以用于为不同对象类型的表示提供大小限制，还包含一些方法可以格式化特定的对象类型。</p>
<dl class="attribute">
<dt id="reprlib.Repr.maxlevel">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxlevel</code><a class="headerlink" href="#reprlib.Repr.maxlevel" title="永久链接至目标">¶</a></dt>
<dd><p>创建递归表示形式的深度限制。 默认为 <code class="docutils literal notranslate"><span class="pre">6</span></code>。</p>
</dd></dl>

<dl class="attribute">
<dt id="reprlib.Repr.maxdict">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxdict</code><a class="headerlink" href="#reprlib.Repr.maxdict" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxlist">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxlist</code><a class="headerlink" href="#reprlib.Repr.maxlist" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxtuple">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxtuple</code><a class="headerlink" href="#reprlib.Repr.maxtuple" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxset">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxset</code><a class="headerlink" href="#reprlib.Repr.maxset" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxfrozenset">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxfrozenset</code><a class="headerlink" href="#reprlib.Repr.maxfrozenset" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxdeque">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxdeque</code><a class="headerlink" href="#reprlib.Repr.maxdeque" title="永久链接至目标">¶</a></dt>
<dt id="reprlib.Repr.maxarray">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxarray</code><a class="headerlink" href="#reprlib.Repr.maxarray" title="永久链接至目标">¶</a></dt>
<dd><p>表示命名对象类型的条目数量限制。 对于 <a class="reference internal" href="#reprlib.Repr.maxdict" title="reprlib.Repr.maxdict"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxdict</span></code></a> 的默认值为 <code class="docutils literal notranslate"><span class="pre">4</span></code>，对于 <a class="reference internal" href="#reprlib.Repr.maxarray" title="reprlib.Repr.maxarray"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxarray</span></code></a> 为 <code class="docutils literal notranslate"><span class="pre">5</span></code>，对于其他则为  <code class="docutils literal notranslate"><span class="pre">6</span></code>。</p>
</dd></dl>

<dl class="attribute">
<dt id="reprlib.Repr.maxlong">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxlong</code><a class="headerlink" href="#reprlib.Repr.maxlong" title="永久链接至目标">¶</a></dt>
<dd><p>表示整数的最大字符数量。 数码会从中间被丢弃。 默认值为 <code class="docutils literal notranslate"><span class="pre">40</span></code>。</p>
</dd></dl>

<dl class="attribute">
<dt id="reprlib.Repr.maxstring">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxstring</code><a class="headerlink" href="#reprlib.Repr.maxstring" title="永久链接至目标">¶</a></dt>
<dd><p>表示字符串的字符数量限制。 请注意字符源会使用字符串的“正常”表示形式：如果表示中需要用到转义序列，在缩短表示时它们可能会被破坏。 默认值为 <code class="docutils literal notranslate"><span class="pre">30</span></code>。</p>
</dd></dl>

<dl class="attribute">
<dt id="reprlib.Repr.maxother">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">maxother</code><a class="headerlink" href="#reprlib.Repr.maxother" title="永久链接至目标">¶</a></dt>
<dd><p>此限制用于控制在 <a class="reference internal" href="#reprlib.Repr" title="reprlib.Repr"><code class="xref py py-class docutils literal notranslate"><span class="pre">Repr</span></code></a> 对象上没有特定的格式化方法可用的对象类型的大小。 它会以类似 <a class="reference internal" href="#reprlib.Repr.maxstring" title="reprlib.Repr.maxstring"><code class="xref py py-attr docutils literal notranslate"><span class="pre">maxstring</span></code></a> 的方式被应用。 默认值为 <code class="docutils literal notranslate"><span class="pre">20</span></code>。</p>
</dd></dl>

<dl class="method">
<dt id="reprlib.Repr.repr">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">repr</code><span class="sig-paren">(</span><em class="sig-param">obj</em><span class="sig-paren">)</span><a class="headerlink" href="#reprlib.Repr.repr" title="永久链接至目标">¶</a></dt>
<dd><p>内置 <a class="reference internal" href="functions.html#repr" title="repr"><code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code></a> 的等价形式，它使用实例专属的格式化。</p>
</dd></dl>

<dl class="method">
<dt id="reprlib.Repr.repr1">
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">repr1</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">level</em><span class="sig-paren">)</span><a class="headerlink" href="#reprlib.Repr.repr1" title="永久链接至目标">¶</a></dt>
<dd><p>供 <a class="reference internal" href="#reprlib.Repr.repr" title="reprlib.Repr.repr"><code class="xref py py-meth docutils literal notranslate"><span class="pre">repr()</span></code></a> 使用的递归实现。 此方法使用 <em>obj</em> 的类型来确定要调用哪个格式化方法，并传入 <em>obj</em> 和 <em>level</em>。 类型专属的方法应当调用 <a class="reference internal" href="#reprlib.Repr.repr1" title="reprlib.Repr.repr1"><code class="xref py py-meth docutils literal notranslate"><span class="pre">repr1()</span></code></a> 来执行递归格式化，在递归调用中使用 <code class="docutils literal notranslate"><span class="pre">level</span> <span class="pre">-</span> <span class="pre">1</span></code> 作为 <em>level</em> 的值。</p>
</dd></dl>

<dl class="method">
<dt>
<code class="sig-prename descclassname">Repr.</code><code class="sig-name descname">repr_TYPE</code><span class="sig-paren">(</span><em class="sig-param">obj</em>, <em class="sig-param">level</em><span class="sig-paren">)</span></dt>
<dd><p>特定类型的格式化方法会被实现为基于类型名称来命名的方法。 在方法名称中，<strong>TYPE</strong> 会被替换为 <code class="docutils literal notranslate"><span class="pre">'_'.join(type(obj).__name__.split())</span></code>。 对这些方法的分派会由 <a class="reference internal" href="#reprlib.Repr.repr1" title="reprlib.Repr.repr1"><code class="xref py py-meth docutils literal notranslate"><span class="pre">repr1()</span></code></a> 来处理。 需要对值进行递归格式化的类型专属方法应当调用 <code class="docutils literal notranslate"><span class="pre">self.repr1(subobj,</span> <span class="pre">level</span> <span class="pre">-</span> <span class="pre">1)</span></code>。</p>
</dd></dl>

</div>
<div class="section" id="subclassing-repr-objects">
<span id="subclassing-reprs"></span><h2>子类化 Repr 对象<a class="headerlink" href="#subclassing-repr-objects" title="永久链接至标题">¶</a></h2>
<p>通过 <a class="reference internal" href="#reprlib.Repr.repr1" title="reprlib.Repr.repr1"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Repr.repr1()</span></code></a> 使用动态分派允许 <a class="reference internal" href="#reprlib.Repr" title="reprlib.Repr"><code class="xref py py-class docutils literal notranslate"><span class="pre">Repr</span></code></a> 的子类添加对额外内置对象类型的支持，或是修改对已支持类型的处理。 这个例子演示了如何添加对文件对象的特殊支持:</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">reprlib</span>
<span class="kn">import</span> <span class="nn">sys</span>

<span class="k">class</span> <span class="nc">MyRepr</span><span class="p">(</span><span class="n">reprlib</span><span class="o">.</span><span class="n">Repr</span><span class="p">):</span>

    <span class="k">def</span> <span class="nf">repr_TextIOWrapper</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">obj</span><span class="p">,</span> <span class="n">level</span><span class="p">):</span>
        <span class="k">if</span> <span class="n">obj</span><span class="o">.</span><span class="n">name</span> <span class="ow">in</span> <span class="p">{</span><span class="s1">&#39;&lt;stdin&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;stdout&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;stderr&gt;&#39;</span><span class="p">}:</span>
            <span class="k">return</span> <span class="n">obj</span><span class="o">.</span><span class="n">name</span>
        <span class="k">return</span> <span class="nb">repr</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span>

<span class="n">aRepr</span> <span class="o">=</span> <span class="n">MyRepr</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="n">aRepr</span><span class="o">.</span><span class="n">repr</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdin</span><span class="p">))</span>         <span class="c1"># prints &#39;&lt;stdin&gt;&#39;</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">目录</a></h3>
  <ul>
<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">reprlib</span></code> --- 另一种 <code class="xref py py-func docutils literal notranslate"><span class="pre">repr()</span></code> 实现</a><ul>
<li><a class="reference internal" href="#repr-objects">Repr 对象</a></li>
<li><a class="reference internal" href="#subclassing-repr-objects">子类化 Repr 对象</a></li>
</ul>
</li>
</ul>

  <h4>上一个主题</h4>
  <p class="topless"><a href="pprint.html"
                        title="上一章"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pprint</span></code> --- 数据美化输出</a></p>
  <h4>下一个主题</h4>
  <p class="topless"><a href="enum.html"
                        title="下一章"><code class="xref py py-mod docutils literal notranslate"><span class="pre">enum</span></code> --- 枚举类型支持</a></p>
  <div role="note" aria-label="source link">
    <h3>本页</h3>
    <ul class="this-page-menu">
      <li><a href="../bugs.html">提交 Bug</a></li>
      <li>
        <a href="https://github.com/python/cpython/blob/3.7/Doc/library/reprlib.rst"
            rel="nofollow">显示源代码
        </a>
      </li>
    </ul>
  </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>导航</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="总目录"
             >索引</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python 模块索引"
             >模块</a> |</li>
        <li class="right" >
          <a href="enum.html" title="enum --- 枚举类型支持"
             >下一页</a> |</li>
        <li class="right" >
          <a href="pprint.html" title="pprint --- 数据美化输出"
             >上一页</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &#187;</li>
        <li>
          <a href="../index.html">3.7.8 Documentation</a> &#187;
        </li>

          <li class="nav-item nav-item-1"><a href="index.html" >Python 标准库</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="datatypes.html" >数据类型</a> &#187;</li>
    <li class="right">
        

    <div class="inline-search" style="display: none" role="search">
        <form class="inline-search" action="../search.html" method="get">
          <input placeholder="快速搜索" type="text" name="q" />
          <input type="submit" value="转向" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    <script type="text/javascript">$('.inline-search').show(0);</script>
         |
    </li>

      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">版权所有</a> 2001-2020, Python Software Foundation.
    <br />
    Python 软件基金会是一个非盈利组织。
    <a href="https://www.python.org/psf/donations/">请捐助。</a>
    <br />
    最后更新于 6月 29, 2020.
    <a href="../bugs.html">发现了问题</a>？
    <br />
    使用<a href="http://sphinx.pocoo.org/">Sphinx</a>2.3.1 创建。
    </div>

  </body>
</html>